﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EstevesRecordersProject
{
    public class Recorder
    {
        public int id;
        public String name;
        public String name2;
        public string ID { get  { return id.ToString(); } }
        public int idEmployee;

        public int NrOfLines { get { return Repository.GetNrOfLines(id); } }
        public Line Line(int nr) { return Repository.GetLine(id, nr); }

        public List<Line> Lines 
        { 
            get 
            { 
                List<Line> l = new List<Line>();

                for (int i = 1; i <= NrOfLines; i++)
                {
                    l.Add( Line(i) );
                }

                return l;

            } 
        }

        public override string ToString()
        {
            return name + " (" + name2 + ")" ;
        }

    }
}
